<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    <title>Document</title>

    <style>
        #div{
            width: 200px;
            height: 200px;
            border-radius: 50%;
            border: 1px solid red;
        }
        .green{
            background-color: green;
        }
        .red{
            background-color: red;
        }
        .yellow{
            background-color: yellow;
        }
    </style>
</head>
<body>
    <div id="app">
      <div id="div" :class="[green,zfx]" @click="divClick">
      </div>
    </div>

    <script>
        let vm = new Vue({
            el:"#app",
             data:{
                flag:false, 
                green:'yellow', 
                zfx:'zfx',
                methods: {
                    divClick(){
                        alert("111");
                     }
                 }
             }
        })
    </script>
</body>
</html>